Scalable snapshot isolation on non-transactional nosql

ABSTRACT

A method of a client processing transactions in a NoSQL database that includes inserting client status from a plurality of clients to a NoSQL database, and sending a call from at least one of the clients in the plurality of client to a client server in the NoSQL database, wherein the client server sends a time stamp to the client. The method further includes reading by the client the clients status from the NoSQL database, and the client validating no conflict for a read or write transaction by the client to the database. The client confirms that a latest version of a value is committed before a start time of the transaction. The client performs the read or write transaction if the latest version of the value has been committed.

BACKGROUND

Technical Field

The present disclosure relates generally to NoSQL database and, inparticular, the processing of transactions in NoSQL environments.

Description of the Related Art

NoSQL (originally referring to “non SQL” or “non relational”) databaseprovides a mechanism for storage and retrieval of data that is modeledin means other than the tabular relations used in relational databases.Motivations for this approach include: simplicity of design, simpler“horizontal” scaling to clusters of machines, which is a problem forrelational databases, and finer control over availability. The datastructures used by NoSQL databases (e.g. key-value, graph, or document)differ slightly from those used by default in relational databases,making some operations faster in NoSQL and others faster in relationaldatabases. NoSQL databases are increasingly used in big data andreal-time web applications.

SUMMARY

According to an aspect of the present principles, a method is providedfor processing transactions in NoSQL databases. In some embodiments, themethod for a client processing transactions in the NoSQL database mayinclude inserting client status from a plurality of clients to saidNoSQL database, and sending a call from at least one of said clients insaid plurality of client to a client server in said NoSQL database,wherein the client server sends a time stamp to said client. The clientthan reads the clients status from the NoSQL database, and validates noconflict for a write transaction. The client validates no conflict bythe client to the database by confirming that a latest version of avalue is committed before a start time of the transaction. The value mayinclude a client ID, a transaction ID and data. The client performs awrite transaction for if the latest version of the value has beencommitted.

According to another aspect of the present principles, a system isprovided for processing transactions in NoSQL databases. In someembodiments, the system includes a client status update transceiver forsending client status from a client to a NoSQL database; and a timestamp transceiver for sending a call from said client to a client server(TS) in said NoSQL database, and receiving a time stamp from said clientserver. The system may further include a client status reader forreading by the client of all clients' status from all clients sendingclient status to the NoSQL database. In some embodiments, the systemfurther includes a conflict validator for validating no conflict for aread or write transaction by said client to said NoSQL database, saidconflict validator confirming that a latest version of a value iscommitted before a start time of the transaction. The value comprises aclient ID, a transaction ID and data. The system may further include aread or write module for performing said read or write transaction bysaid client if said latest version of the value has been committed.

In accordance with another aspect of the present disclosure anon-transitory article of manufacture is provided that tangibly embodiesa computer readable program. In one embodiment, a non-transitorycomputer readable storage medium is provided that includes a computerreadable program for processing transactions in NoSQL databases. Thecomputer readable program when executed on a computer causes thecomputer to perform the steps of inserting client status from aplurality of clients to the NoSQL database, and sending a call from atleast one of the clients in the plurality of clients to a client serverin the NoSQL database, wherein the client server sends a time stamp tothe client. The client than reads the clients status from the NoSQLdatabase, and validates no conflict for a write transaction. The clientvalidates no conflict by the client to the database by confirming that alatest version of a value is committed before a start time of thetransaction. The value may include a client ID, a transaction ID anddata. The client performs a write transaction for if the latest versionof the value has been committed.

These and other features and advantages will become apparent from thefollowing detailed description of illustrative embodiments thereof,which is to be read in connection with the accompanying drawings.

BRIEF DESCRIPTION OF DRAWINGS

The disclosure will provide details in the following description ofpreferred embodiments with reference to the following figures wherein:

FIG. 1 is a schematic illustrating snapshot isolation for data accessvia transactional Application Protocal Interfaces (APIs) as used in aNoSQL database service, in accordance with one embodiment of the presentdisclosure.

FIG. 2 is a flow/block diagram illustrating initialization steps of aclient, in accordance with one embodiment of the present disclosure.

FIG. 3 is a schematic illustrating mapping between database servers andapplication servers (clients), in accordance with one embodiment of thepresent disclosure.

FIG. 4 is a flow/block diagram illustrating one embodiment of a methodof beginning a transaction in a NoSQL database service, in accordancewith one embodiment of the present disclosure.

FIG. 5 is a schematic that illustrates one embodiment of beginning atransaction in NoSQL databases, in accordance with one embodiment of thepresent disclosure.

FIG. 6 is a flow/block diagram illustrating one embodiment of writetransaction in NoSQL databases, in accordance with one embodiment of thepresent disclosure.

FIG. 7 is a schematic that illustrates one embodiment of a writeoperation in NoSQL databases, in accordance with the present disclosure.

FIG. 8 is a schematic that illustrates one embodiment of a writeoperation in NoSQL databases with a cache update, in accordance with thepresent disclosure.

FIG. 9 is a flow/block diagram illustrating one embodiment of readtransaction in NoSQL databases, in accordance with one embodiment of thepresent disclosure.

FIG. 10 is a schematic that illustrates one embodiment of a readtransaction in NoSQL databases, in accordance with one embodiment of thepresent disclosure.

FIG. 11 is a flow/block diagram illustrating one embodiment of a committransaction in NoSQL databases, in accordance with one embodiment of thepresent disclosure.

FIG. 12 is a schematic that illustrates one embodiment of a committransaction in NoSQL databases, in accordance with one embodiment of thepresent disclosure.

FIG. 13 shows an exemplary processing system to which the presentprinciples may be applied, in accordance with an embodiment of thepresent principles.

FIG. 14 is a block diagram illustrating an exemplary system for aprocessing transactions in NoSQL databases, in accordance with anembodiment of the present principles.

FIG. 15 shows an exemplary cloud computing node, in accordance with anembodiment of the present principles.

FIG. 16 shows an exemplary cloud computing environment, in accordancewith an embodiment of the present principles.

FIG. 17 shows exemplary abstraction model layers, in accordance with anembodiment of the present principles.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

The present principles are related to processing transactions in NoSQLdatabases. NoSQL, which encompasses a wide range of technologies andarchitectures, seeks to solve the scalability and big data performanceissues that relational databases weren't designed to address. Inaccordance with some embodiments of the present disclosure, it can beassumed that multiple database servers provide a service of a NoSQLdatabase.

A NoSQL database environment is a non-relational and largely distributeddatabase system that enables rapid, ad-hoc organization and analysis ofextremely high-volume, disparate data types. NoSQL databases aresometimes referred to as cloud databases, non-relational databases, BigData databases and a myriad of other terms and were developed inresponse to the sheer volume of data being generated, stored andanalyzed by modern users (user-generated data) and their applications(machine-generated data).

In general, NoSQL databases have become the first alternative torelational databases, with scalability, availability, and faulttolerance being key deciding factors. They go well beyond the morewidely understood legacy, relational databases (such as Oracle, SQLServer and DB2 databases) in satisfying the needs of today's modernbusiness applications. A very flexible and schema-less data model,horizontal scalability, distributed architectures, and the use oflanguages and interfaces that are “not only” SQL typically characterizethis technology. Contrary to misconceptions caused by its name, NoSQLdoes not prohibit structured query language (SQL). While it's true thatsome NoSQL systems are entirely non-relational, others simply avoidselected relational functionality such as fixed table schemas and joinoperations. For example, instead of using tables, a NoSQL database mightorganize data into objects, key/value pairs or tuples.

There are four general types of NoSQL databases, each with their ownspecific attributes:

Graph database—Based on graph theory, these databases are designed fordata whose relations are well represented as a graph and has elementswhich are interconnected, with an undetermined number of relationsbetween them. Examples include: Neo4j and Titan.

Key-Value store—we start with this type of database because these aresome of the least complex NoSQL options. These databases are designedfor storing data in a schema-less way. In a key-value store, all of thedata within consists of an indexed key and a value, hence the name.Examples of this type of database include: Cassandra, DyanmoDB, AzureTable Storage (ATS), Riak, BerkeleyDB.

Column store—(also known as wide-column stores) instead of storing datain rows, these databases are designed for storing data tables assections of columns of data, rather than as rows of data. While thissimple description sounds like the inverse of a standard database,wide-column stores offer very high performance and a highly scalablearchitecture. Examples include: HBase, BigTable and HyperTable.

Document database—expands on the basic idea of key-value stores where“documents” contain more complex in that they contain data and eachdocument is assigned a unique key, which is used to retrieve thedocument. These are designed for storing, retrieving, and managingdocument-oriented information, also known as semi-structured data.Examples include: MongoDB and CouchDB.

Major NoSQLs do not support transactions. As used herein, a“transaction” comprises a set of data manipulation operations on thestate of a database system managed as a single unit of work, so all theoperations must either entirely be completed (committed) or have noeffect (aborted). In other words, partial executions of the transactionare not defined (nor desired in general) because the final state of thedatabase can be corrupted. Without the support for transactions,developers can be burdened with ensuring atomic execution of scatteredchanges in data upon failures as well as when there are concurrentaccesses to the same data by multiple clients. In order to processtransactions, conventional database systems provide a specific componentcalled the Transaction Manager. The goal of transaction managers ingeneral is to guarantee the so-called ACID properties of transactions:Atomicity, Consistency, Isolation and Durability. However, ACIDproperties are hard to scale when databases have to deal with very largeamounts of data and thousands of concurrent users, because the data mustbe partitioned, distributed and replicated. That is one of the reasonswhy, with the advent of NoSQL big data stores, transactions wereinitially left out of the equation. HBase, Dynamo, BigTable, PNUTS,Cassandra, etc. lacked this precious feature initially. However, withthe popularization of NoSQL big datastores in many areas of theindustry, the need for transactions has become advantageous for certainapplications. For example, as applications become larger and morecomplex, transactions are sometimes needed to maintain consistency ofthe application.

It has been determined that prior methods, e.g., optimistic currencycontrol (OCC), for handling transactions are insufficient. For example,percolator stores dirty data and transaction states in NoSQL. Eachclient processes the validation phase of OCC for each store of dirtydata (decentralized approach). Omid provides a centralized server thatprocesses the validation phase of OCC. Each client stores dirty data inNoSQL and sends keys of modified values in a transaction to the server(centralized approach). However, these approaches require the system toprocess heavy overheads of transactions. For example, percolator clientssend two write requests to NoSQL for each write in a transaction. Thecentralized server of Omid becomes the bottleneck in disturbedenvironments.

The methods, systems and computer program products disclosed hereinprovide a new solution to the aforementioned difficulties. In someembodiments, the methods, systems and computer program products of thepresent disclosure provide for processing of transactions by using onlybasic NoSQL operations. The NoSQL database service includes managementof key value pairs of a map m by following Application ProtocalInterfaces (APIs). More specifically, in one example, transactionprocessing is provided with only three methods of the NoSQL database fora map object m: m.get(k), which returns the latest version v of a valueof a key k, m.prev(v), which returns the previous version of v, andm.put(k, v_(prev), v_(new)), which adds a new version v_(new) if thelatest version of k is v_(prev) and returns true if v_(prev) is thelatest; otherwise, returns false. In some embodiments, the methods,systems and computer program products that are disclosed herein mayprovide a method to process transactions by using only basic NoSQLoperations, and may incorporate snapshot isolation support; one writerequest for each transactional write; and no validation in thecentralized server. The NoSQL database service disclosed hereinguarantees strong consistency for data access via the APIs. Based on ahash code of a key k, the NoSQL database stored all the versions of k'svalue.

The methods, systems and computer program products that are disclosedherein provide transactional data access via following APIs by using theNoSQL API's, which may include: begin ( ): starts a transaction andreturns its transaction ID (x_(id)); xmap.xput (x_(id), k, v): inserts anew version of k's value into a map xmap in the transaction of x_(id);xmap.xget (x_(id),k): gets the latest version of k's value from a map(xmap) in the transaction of x_(id); commit (x_(id)): commits thetransaction of (x_(id)); and rollback (x_(id)): rolls back thetransaction of (x_(id)).

In some embodiments, the methods, systems and computer program productsthat are disclosed herein can provide snapshot isolation for data accessvia the transactional APIs described above, which is schematicallydepicted in FIG. 1. In some embodiments, because the methods, systemsand computer program products can also enable other isolation levels,the snapshot isolation depicted in FIG. 1 may be optional. In databases,and transaction processing (transaction management), “snapshotisolation” is a guarantee that all reads made in a transaction will seea consistent snapshot of the database (in practice it reads the lastcommitted values that existed at the time it started), and thetransaction itself will successfully commit only if no updates it hasmade conflict with any concurrent updates made since that snapshot.Snapshot isolation reduces validation errors. In one embodiment, asdepicted in FIG. 1, a transaction can read all the versions that havebeen committed when the transaction started. For example, x₁ and x₂ readv_(o) and x₃ can read v₁. As will be shown below, with snapshotisolation, when a client starts a transaction with a start time stamp(t_(start)), the client reads all the committed values at the start timestamp (t_(start)). With a first-committer (Updater)-Win, when twoconcurrent transactions attempt to write the same value, only one ofthem can commit the transaction. With a multi-version concurrencycontrol (MVCC), one value had multiple versions, and each client canread any of the versions. For read-write transactions with the methods,systems and computer program products of the present disclosure, theclients gets a start timestamp (t_(start)) when a transaction begins;and the client reads a version of the value, which is the latest at thestart timestamp (t_(start)). The client sends the start timestamp(t_(start)), and a write set to the database server. The database serverclocks a commit timestamp (t_(commit)), and validates no overlapsbetween the write set and writes between the commit timestamp(t_(commit)) and the start timestamp (t_(start)).

FIG. 2 is a flow/block diagram illustrating initialization steps of aclient. When a client starts, an unique client ID is generated (c_(id))at step 1, a empty client status cs is generated at step 2, and then thecs is inserted to a special map SYS in the NoSQL database withSYS.put(c_(id), null, cs) at step 3.

Initialization of the database servers may include selecting one serverto provide time stamps to all the clients. In this example, a clientdefines a map SYS, a client puts θ as a value of a special key TS bycalling SYS.put (TS, null, θ). The NoSQL database selects one server tostore the value based on the key θ. When a client gets a new timestamp,the client calls: 1. current=SYS.get (TS); and/or 2. SYS.put (TS,current, (current+1)). In some embodiments, when the put returns false,the process restarts from 1. In some embodiments, when the put returnstrue, the method uses current+1, as the new times stamp.

Referring back to FIG. 2, during initialization of the client, at step1, when the client starts, the client generates a unique client IDc_(id). In one example, this may be referred to as getting a new timestamp. At step 2, the method may continue with inserting an empty clientstatus cs as c_(id)'s value in SYS. In some embodiments, the put callmust not fail because c_(id) is unique. In some embodiments, this clientstatus is used to manage all the transactions that the client of c_(id)executes. As illustrated in FIG. 2, the method continues at step 3 withinserting a client status cs to the NoSQL database by calling SYS.put(c_(id), null, cs).

The NoSQL database locates key-value pairs on the database server basedon the keys. Because one database server manages one pair of key andvalue, multiple servers may manage client IDs, as described in FIG. 3.Each client stores a client status that manages transactions of theclient. Each client can cache all of the client statuses and processesvalidation in the optimistic concurrently control (OCC). When multipleclients run, their client statuses and the timestamps can be located indifferent servers.

FIG. 3 is a schematic illustrating mapping between database servers 5and application servers (clients) 10, in which multiple NoSQL databaseservers manage transactions, in accordance with one embodiment of thepresent disclosure. For example, databases server 5 a can manage thetransactions for application servers (clients) 10 a, 10 b, 10 c;database server 5 b can manage the transactions for application servers(clients) 10 d, 10 e; and database server 5 c can manage thetransactions for application servers (clients) 10 f, 10 g, 10 h.Database server 5 c may also manage time stamping. Timestamp is thecurrent time of an event that is recorded by a computer. The databaseserver identified by reference number 5 c may also be referred to acentralized time stamp server (TS).

The system can use sequential numbers as timestamps. In other word, theTS server can return sequential numbers as timestamps. For example, if aspecial map SYS is defined and TS is a constant value, and then clientscan get a timestamp by (1) acquiring the current clock current bycalling SYS.get(TS), and (2) updating the value with SYS.put(TS,current, current+1). If a call of put is successful, the value(current+1) is the current timestamp. If a NoSQL database executes (1)and (2) with a single API call (such as ($inc operator of MongoDB), theAPI call can be used for time stamping.

In some embodiments, a client, i.e., application server 10, stores aclient status in the NoSQL database. The client status may includemappings from transaction IDs of committed transactions to their committime (e.g., x_(id)→t_(commit)), and transaction IDs of abortedtransactions and constraints to commit active transactions. A constraintin a client status is an order constraint, e.g., mapping of thetransaction ID (x_(id)) with a constraint time t_(constraint), e.g.,X_(id)→t_(constraint). In some embodiments, the transaction IDs ofcommitted and aborted client statuses must be disjointed. Further, thecommit time t_(commit) in committed must be greater than the constrainttime t_(constraint) in constraint.

In some embodiments, the methods, systems and computer program productsdisclosed herein operate under the assumption that each client 10 a, 10b, 10 c, 10 d, 10 e, 10 f, 10 g, 10 h continuously requests multipletransactions. In some embodiments, the idea is that each version of avalue includes IDs of a client (c_(id)) and a transaction ID (x_(id))that generated and committed the version. In other word, when a clientcalls m.put(k, v_(prev), v_(new)), the v_(new), includes c_(id) andx_(id). The NoSQL, i.e., database servers 5 a, 5 b, 5 c, stores a clientstatus for each client to manage committed and aborted transactions.

In some embodiments, the methods, systems and computer program productsselect one server TS server from database servers 5 a, 5 b, 5 c of aNoSQL. The selected server TS from the database serves managestimestamps, i.e., manages the start time t_(start), and the commit timet_(commit). Each version of a record includes the ID of the client(c_(id)), th ID of the transaction (x_(id)), and row data. In thecontext of a relational database, a row—also called a record ortuple—represents a single, implicitly structured data item in a table.

Each client 10 a, 10 b, 10 c, 10 d, 10 e, 10 f, 10 g, 10 h stores aclient status (cs) in the NoSQL database 5 a, 5 b, 5 c. The clientstatus (cs) that is stored by the NoSQL database 5 a, 5 b, 5 c includecommitted client status, e.g., committed transactions mapping atransaction ID to a commit time t_(commit), and aborted client status,e.g., aborted transactions. The Client Status (cs) that is stored by theNoSQL database 5 a, 5 b, 5 c may optionally include a constraint clientstates, which includes the order constraint, e.g., mapping of thetransaction ID (x_(id)) with a start time Ts. Each client 10 a, 10 b, 10c, 10 d, 10 e caches client statuses in the NoSQL database 5 a, 5 b, 5c. In some embodiments, the database servers, i.e., the NoSQL database 5a, 5 b, 5 c, are Desktop as a Service (DaaS), ex. Cloudera and MongoDB.In some embodiments, the clients can be provided as application serversis Infrastructure as a Service (IaaS), e.g., Softlayer and AWS, andplatform as a service (PaaS), e.g., Bluemix and Heroku. In someembodiments, there is no interaction between the servers, and there isnot transactional operation for the multi-writes at the clients. Theremay be dynamic routing based on the workload between the clients and theservers.

In some embodiments, each client validates no conflict for each write toconfirm the latest version is committed before the start time(t_(start)) by using the cached client status of the value's client ID(c_(id)). In some examples, the client validates that no conflict existsmay include a first step (1) of fetching the latest version of a value,a second step (2) of identifying a cache of a client status with thevalue's client ID (c_(id)), and a third step (3) of checking the value'stransaction status (x_(id)) in the client status. If it is not committedyet, the client validates process may continue at step (4) with updatingthe cache and continuing the processes at step (3) again. In someexamples, if the latest version is not committed, the client fails theclient's transaction, aborts the transaction of the value's transaction(x_(id)), or adds an order constraint to the status, and reads theprevious version.

FIG. 4 is a flow/block diagram illustrating one embodiment of a methodof beginning a transaction, in accordance with one embodiment of thepresent disclosure. In some embodiments, starting a transaction x_(id)in a client (c1) may begin at step 15 by getting a timestamp (t_(start))from the centralized time stamp server (TS) by calling SYS.get(TS). Atstep 20, the client (c1) generates a unique transaction ID (x_(id))(inlocal).

Referring to FIG. 5, in some embodiments, generating the transaction ID(x_(id)) may begin with a client, e.g., client 10 as depicted in FIG. 3,making a call to the centralized server, e.g., NoSQL database server 5 cthat has been selected for time stamp (TS) management. This call isdepicted by step 1, which is identified by reference number 26 in FIG.5. In response to the call from the client 10, the centralized server,e.g., NoSQL database server 5 c, generates a time stamp (t_(start)),which is identified by reference number 27 in FIG. 5. The client 10 maythen generate a transaction ID (x_(id)), as identified by referencenumber 28 in FIG. 5.

FIG. 6 illustrates one embodiment of a process flow for a writeoperation (xput) in a transaction in NoSQL databases in accordance withthe present disclosure. Options in xput processing can include that theclient can update the cache of the client status of v_(prev). cid bycalling SYS.get(c_(id)). The client can also abort the transaction ofv_(prev).xid and delete the version v_(prev) from the k's value in theNoSQL database.

Referring to FIG. 6, the method disclosed herein may employ only onewrite request for each transactional write. Each client may validate noconflict for each write, which is similar to Percolator, in order toconfirm the latest version is committed before the start time(t_(start)) by using the cached client status (cs) of the value's clientID. For example, the client may at step 20 fetch the latest version of avalue (v_(prev)) by calling map.get(k). In a following step 25, theclient can identify a cache of a client status (cs) with the v_(prev)'sclient ID (v_(prev).cid). For example, the client can identify whetherv_(prev).xid was committed by using the cached client status ofv_(prev).cid. At step 30, the client can check the value's transactionID (v_(prev).xid) in the client status (cs). For example, the client cancheck whether v_(prev).xid is already committed. If v_(prev).xid has notbeen committed, the transaction is aborted at step 60. Assuming thatv_(prev).xid has been committed, the method may continue at step 35,which includes the client identifying whether the commit timestamp withthe transaction ID of the fetched value (v_(prev).xid) was committed byusing the cached client status of v_(prev).xid. In a following step, theclient can compare the t_(commit) of v_(prev).xid and t_(start) of thetransaction at step 40. If the latest version is not committed orcommitted after t_(start) of the transaction at steps 30 and 40, theclient fails the client's transaction, aborts the transaction of thevalue's x_(id) (v_(prev).xid), or adds an order constraint to the statusand read the previous version. If at step 35, the client cannot identifywhether v_(prev) is committed with the cached client status, the clientcan update the cache (as depicted in FIG. 8), e.g., update the NoSQLdatabase with client status (cs) by calling cs.get(v_(prev).cid) andbegins the processes again at step 25.

Finally, at step 45, the client generates a new version of the valuev_(new) by setting v_(new).cid, v_(new).xid and v_(new).data as theclient ID and transaction ID of the transaction and the value that thetransaction is writing, and the client inserts v_(new) as the nextversion of v_(prev). At step 50 if the put is successful, the writeoperation (xput) is finished at step 55. At step 50 if the put is notsuccessful the transaction is aborted at step 60. This method fails ifthe other client updates v_(prev) before the call. When the call fails,the transaction is aborted.

Referring to FIGS. 6 and 7, the write operation (xput) may include theclient fetching a latest version v_(prev) of a value at step 20. FIG. 7illustrates a xput function of a client c₁ with a new value v1 in atransaction x₁. A database shard is a horizontal partition of data in adatabase.

The value v_(prev) may include data, e.g., row data, a transaction ID(x₀), and a client ID (c₀). The client 10 may fetch the value from adatabase server 5 of the NoSQL databases, as depicted by FIG. 7. Thisstep is illustrated in FIG. 6 as step 1. More specifically, the client10 sends a request, as identified by reference number 36, for the latestversion of a value to the database server, e.g., NoSQL databases 5.Still at step 1, the database server 5, e.g., NoSQL databases, returns aversion (v_(prev)) of the value to the client that made the request.This is illustrated by the arrow identified by reference number 37 inFIG. 7. The version (v_(prev)) of the value may include data, atransaction ID (x₀) and a client ID (c₀).

Referring to step 25 of FIG. 6, the method may continue with the clientidentifying the client (c₀) and transaction (x₀) from the version(v_(prev)) of the value. This is illustrated at step 2 in FIG. 7. Insome embodiments, the client 10 can check the commit time (t_(commit))of the version (v_(prev)) of the value from the client status (cs) asidentified at reference number 41.

At steps 30, 35 and 40 of FIG. 6, if the value is committed before thetransaction started, the method continues to step 45. At step 45 of themethod depicted in FIG. 6, the client 10 inserts a new version (v_(new))of the value that follows the previous version (v_(prev)) of the valueby using client access server (CAS) operation. v_(new) consists of atransaction ID (x₁), client ID (c₁), and data. If the other version hasalready followed v_(prev), then the client does not insert v_(new) androlls back the transaction of the client (write fail). The clienttypically adds the new version (v_(new)) if the fetched version is stillthe latest. This is depicted in FIG. 7 by step 3 of writing from theclient to the database server (as identified by the arrow havingreference number 66) the new version with the client ID (c₁) and thetransaction ID (x₁), when the version (v_(new)) is the latest.

If the client cannot identify whether the version of the value is notcommitted with the cache of the client status, the client can update thecache and restart the write process. For example, if the transaction IDx₀ processed by the client c₀ for the version (v_(prev)) in FIG. 8 isnot in the mapping of the committed transactions to commit timestamps ofthe client status of c₀, the client updates the cache of client status(cs). The client 10 may then check to determine whether the latest,i.e., updated, version of the value (x₀) is committed at step 35 of themethod depicted in FIG. 6. For example, the client may check todetermine v_(prev).xid is committed with the cached client status ofv_(prev).cid, again. In some embodiments, this may include the clientchecking the commit timestamp (t_(c)), as illustrated by step 4 of FIG.8.

If the version v_(prev) of the value is not committed, the client canattempt to abort the transaction of v_(prev).xid. If the client cannotabort it, the client can rolls back the transaction of the client (writefailure) at step 60 of FIG. 6.

If when the client checks to determine whether the latest, i.e.,updated, version of the value (v_(prev).xid) is committed at step 40 ofthe method depicted in FIG. 6, and the value is committed, the methodcontinues to step 45.

At step 45 of the method depicted in FIG. 6, the client 10 inserts a newversion (v_(new)) of the value that follows the previous version(v_(prev)) of the value by using client access server (CAS) operation.v_(new) consists of a transaction ID (xid), client ID (cid), and data.If the other version has already followed v_(prev), then the client doesnot insert v_(new) and rolls back the transaction of the client (writefail). The client typically adds the new version (v_(new)) if thefetched version is still the latest. This is depicted in FIG. 8 by step5 of writing from the client to the database server (as identified bythe arrow having reference number 66) the new version with the client ID(c₁) and the transaction ID (x₁), when the version (v_(prev)) is thelatest.

FIG. 8 depicts a write operation with a cache update. The sequence ofoperations depicted in FIG. 8 are similar to the sequence of operationsthat are depicted in FIG. 7. FIG. 8 further includes step 3, which isidentified by reference numbers 46 and 47, and includes the cache updateafter checking the t_(commit) of x₀. The arrow identified by referencenumber 46 represents that when vprev is not committed, the clientupdates the client status of c₀. The arrow identified by referencenumber 47 is the returned client status cs.

FIG. 9 illustrates one embodiment of a method of performing a readoperation (xget) using NoSQL databases, in accordance with oneembodiment of the present disclosure. FIG. 10 is a schematic thatillustrates one embodiment of a read operation in a transaction x₁ inNoSQL databases. The read operation may be referred to as an xgetoperation, in which the client takes one read from a shard. In someembodiments, the xget operation may include fetching the latest versionof value; confirming the version is committed via the status of theclient that added the version; if it is not committed, trying to add anorder constraint; and if the version is committed after the begin of thetransaction, trying to read the previous version. One option in xgetprocessing may include the client updating the cache of the clientstatus of v_(prev).cid by calling SYS.get(c_(id)). The client can alsoadd an order constraint to the client status of v_(prev).cid beforecalling v_(prev).prev( ).

Referring to step 65 of the method depicted in FIG. 9, the readoperation may begin with fetching a latest version v_(prev) of a value.The client may fetch the latest version v_(prev) of a value by callingmap.get(k). Referring to FIG. 10, the client 10 may fetch the value froma database server 5 of the NoSQL databases. This step is illustrated inFIG. 10 as step 1. More specifically, the client 10 sends a request, asidentified by reference number 71, for the latest version of a value tothe database server, e.g., NoSQL databases 5. Still at step 1, thedatabase server 5, e.g., NoSQL databases, returns a version (v_(prev))of the value to the client that made the request. This is illustrated bythe arrow identified by reference number 71 in FIG. 10. The version(v_(prev)) of the value may include data, a transaction ID (x₀) and aclient ID (c₀).

Referring to step 70 of FIG. 9, the method may continue with the clientidentifying the client (c_(id)) and transaction (x_(id)) from theversion (v_(prev)) of the value. This is illustrated at step 2 in FIG.10. In some embodiments, the client 10 can check the commit time(t_(commit)) of the version (v_(prev)) of the value from the clientstatus (cs).

Referring to step 75 of FIG. 9, the method can continue with the clientchecking if the version of the value (v_(prev).xid) has been committed.

At step 75 of FIG. 9, if the value is committed, the method continues tostep 80. At step 80, the client identifies when v_(prev).xid wascommitted by using the chanced client status of v_(prev).cid.

At step 85 of the method depicted in FIG. 9, if the value is committedand the commit time (t_(commit)) is less than the start time(t_(start)), the client reads the data (v_(prev).data) and there is asuccessful read event, e.g., step 90 includes return v_(prev) data.

If the client cannot identify whether the version of the value(v_(prev).xid) is committed with the cache of the client status, theclient can update the cache of the client status of the value(v_(prev).cid). For example, if the client ID, i.e., identified client,for the version (x₀) is not committed, the client updates the cache withthe Client Status of the client (c₀). This is depicted as step 3 in FIG.10 by the arrows identified by reference numbers 81, 82.

Turning to step 75 of FIG. 9, if the version (v_(prev)) of the value isnot committed, the client waits for the finish of the transaction ofv_(prev).xid, or attempts to abort the transaction of v_(prev).xid, oradds an order constraint to the client status of the client(v_(prev).cid) in the NoSQL database. This step is illustrated in FIG.10 by the arrows 96, 97. With the constraint in FIG. 10, the transactionof x₀ can be committed only when the t_(commit) of x₀ is later than thet_(start) of x₀.

Referring to step 95 of FIG. 9, if the client cannot read the versionv_(prev) of the value, the client gets the previous version, sets it tobe the version v_(prev) of the value, and then the process goes back tostep 70.

FIG. 11 illustrates one embodiment of a commit transaction in NoSQLdatabases. The commit transaction may include two calls to a centralizedserver (TS) and a shard of the client status, as depicted in FIG. 12where c₁ commits a transaction of x₁.

Referring to FIG. 11, the commit transaction may begin with step 110,which may include getting a new timestamp (t_(commit)). As illustratedin FIG. 12, the client 10 may receive the new timestamp (t_(commit))from the centralized server (TS). This is illustrated at step 1 in FIG.12, which includes a request being made by the client as identified byreference number 111, and a new time stamp being sent to the client fromthe centralized service as identified by reference number 112.

At step 115, the commit transaction may continue with the fetched clientstatus (cs) from the database when necessary. The fetched client status(cs) is copied to cs_(new). The commit transaction updates the cs_(new),as the next version of cs and will update cs in the database withcs_(new) by calling at step 135.

At step 120, the commit transaction may continue with determined whetherabort transactions in the client status (cs) include x_(id). If theclient status (cs) includes abort transactions, the transaction fails tocommit at step 130. If the client status (cs) does not include aborttransactions, a determination is made of whether order constraints inthe client stats (cs) satisfy the commit time (t_(commit)). If the orderconstraints fail to satisfy the commit time, the sequence goes back tostep 110 of FIG. 11. If the order constraints satisfy the commit time,the process continues to step 135.

Referring to FIG. 11, at step 135, the client adds the pair of thetransaction ID (x_(id)) and the commit time (t_(commit)) into themapping of committed transactions to commit timestamps in the clientstatus cs_(new). For example, the client updates the client status (cs)in the database with SYS.put(c_(id), cs, cs_(new)). The client statuscs_(new) is also cached in the memory.

Still referring to FIG. 11, at step 140, the method continues with theclient determining whether SYS.put(c_(id), cs, cs_(new)) succeeds. IfSYS.put(c_(id), cs, cs_(new)) succeeds, the commit transaction isfinished at step 15. If SYS.put(c_(id), cs, does not succeed, theprocess goes back to step 110. Further, if the clients status includesthe transaction ID in the aborted transactions, the transaction fails atstep 140, and the process goes back to step 110. Also, if the committime (t_(commit)) does not satisfy the constraints in client statusconstraints at step 125, the method restarts again at step 110.

The above steps is depicted in FIG. 12 as step 2, in which the arrowidentified by reference number 126 illustrates the client adding thetransaction ID (x₁) to the client status of the client c₁. By usingNoSQL database function, such as findAndModify method of MongoDB, theclient can process steps of FIGS. 11 and 12 except for step 110 withonly one interaction with the server.

One example of an order constraint for use with the method describedabove with reference to FIGS. 1-12 includes a scenario in which clients,i.e., client 1 (c1) and client 2 (c2) write and read a value,respectively. For example, the client 1 (c1) may start with a firsttransaction ID (Xid1) and with a first start time (Ts1). The firstclient (c1) updates the record with a new version (v); and the firstclient (c1) gets Tc2, a second commit time, as the commit timestamp. Theclient 2 (c2) starts with a second transaction (Xid2) with a second timestamp (Ts2) after Tc1. The client 2 (c2) skips reading v, i.e., theversion of the value, because v is not committed. After the client 2skipped reading v, the client 1 (c1) commits v with Tc1. Though Tc1<Ts2,the client 2 (c2) does not read v.

In the above scenario, one solution in accordance with the presentdisclosure is an order constraint. For example, before skipping readingv, the second client (c2) may add an order constraint of c1; Xid1 mustbe committed after Ts2. The client status may be implemented theconstraint by adding a mapping from Xid1 to Ts2. This operation fails ifthe first transaction ID (Xid1) has been committed by using compare andswap function. The second client (c2) skips reading the version v of thevalue if the client can add the order constraint. The first client (c1)fails to commit v with Tc1 because order constraint is not satisfied andthen the first client (c1) gets a new timestamp Tc1′, which is laterthan Ts2. The first client (c1) may then commit the v of the value withTc1′. It is noted that this is only one example of a constraint that maybe used with the present disclosure, and it is not intended that thepresent disclosure be limited to only this example. Other examples ofconstraints have also been contemplated, and are within the scope of thepresent disclosure.

In some embodiments, the methods, systems and computer program productsthat are disclosed herein truncate and cache client statuses. Truncatecommitted transactions with presumed commit policy may provide that if atransaction state is not in the database, the transaction must becommitted. In some embodiments, the methods, systems and computerprogram products may further include water marks (WM). A water mark (WM)may provide a transaction ID (Xid). Transactions with lower Xids than WMmust be committed except for the listed aborted transactions. Asdescribed above, each client periodically stores and maintainswatermarks (WM) in the NoSQL database.

In some embodiments, the methods, systems and computer program productsdisclosed herein provide for truncated aborted transactions with atimeout policy. In some embodiments, the time out policy includes thateach transaction can not commit if the gap between the start and committimestamps is greater than time out. In some embodiments, the time outpolicy includes the removal of all dirty versions of the abortedtransactions from shards. In some examples, the latest timestampfollowing finishing of the removal of the dirty versions, the latesttimestamp is a clean time stamp (cleanTS). In some embodiments, if cleanTS is timed out, committable transactions can never see the abortedversions.

FIG. 13 shows an exemplary processing system 200 to which the presentprinciples may be applied as a client 10 interacting with the NoSQLdatabase depicted in FIG. 3. The processing system 200 includes at leastone processor (CPU) 204 operatively coupled to other components via asystem bus 102. A cache 206, a Read Only Memory (ROM) 208, a RandomAccess Memory (RAM) 210, an input/output (I/O) adapter 220, a soundadapter 230, a network adapter 240, a user interface adapter 250, and adisplay adapter 260, are operatively coupled to the system bus 102.

A first storage device 222 and a second storage device 224 areoperatively coupled to system bus 102 by the I/O adapter 220. Thestorage devices 222 and 224 can be any of a disk storage device (e.g., amagnetic or optical disk storage device), a solid state magnetic device,and so forth. The storage devices 222 and 224 can be the same type ofstorage device or different types of storage devices.

A speaker 232 is operatively coupled to system bus 102 by the soundadapter 230. A transceiver 242 is operatively coupled to system bus 102by network adapter 240. A display device 262 is operatively coupled tosystem bus 102 by display adapter 260.

A first user input device 252, a second user input device 254, and athird user input device 256 are operatively coupled to system bus 102 byuser interface adapter 250. The user input devices 252, 254, and 256 canbe any of a keyboard, a mouse, a keypad, an image capture device, amotion sensing device, a microphone, a device incorporating thefunctionality of at least two of the preceding devices, and so forth. Ofcourse, other types of input devices can also be used, while maintainingthe spirit of the present principles. The user input devices 252, 254,and 256 can be the same type of user input device or different types ofuser input devices. The user input devices 252, 254, and 256 are used toinput and output information to and from system 200.

Of course, the processing system 200 may also include other elements(not shown), as readily contemplated by one of skill in the art, as wellas omit certain elements. For example, various other input devicesand/or output devices can be included in processing system 200,depending upon the particular implementation of the same, as readilyunderstood by one of ordinary skill in the art. For example, varioustypes of wireless and/or wired input and/or output devices can be used.Moreover, additional processors, controllers, memories, and so forth, invarious configurations can also be utilized as readily appreciated byone of ordinary skill in the art. These and other variations of theprocessing system 200 are readily contemplated by one of ordinary skillin the art given the teachings of the present principles providedherein.

Moreover, it is to be appreciated that system 300 described below withrespect to FIG. 14 is a system for implementing respective embodimentsof the present principles. Part or all of processing system 200 may beimplemented in one or more of the elements of system 300. Further, it isto be appreciated that processing system 200 may perform at least partof the method described herein including, for example, at least part ofmethods described with reference to FIGS. 1-12.

FIG. 14 shows an exemplary system 300 for a client supportingtransactions in a NoSQL database, in accordance with an embodiment ofthe present principles. The system 300 includes at least a client statustransceiver 301, a time stamp transceiver 302, a client status reader303, a conflict validator 304, a read module 305, a write module 306 anda transaction module 306. In the embodiment shown in FIG. 14, theaforementioned elements thereof are interconnected by bus(es)/network(s)102. However, in other embodiments, other types of connections can alsobe used. Moreover, in an embodiment, at least one of the elements ofsystem 300 is processor-based, e.g., hardware processor-based. Further,while one or more elements may be shown as separate elements, in otherembodiments, these elements can be combined as one element. The converseis also applicable, where while one or more elements may be part ofanother element, in other embodiments, the one or more elements may beimplemented as standalone elements. These and other variations of theelements of system 300 are readily determined by one of ordinary skillin the art, given the teachings of the present principles providedherein, while maintaining the spirit of the present principles.

In one embodiment, the client status update transceiver 301 provides forsending client status from a client to a NoSQL database. The time stampreceiver 302 provides for sending a call from said client to a clientserver in the NoSQL database, and receiving a time stamp from the clientserver. The functions provided by the client status update transceiver301 and time stamp receiver 302 have been further described about withrespect to the methods described with reference to FIGS. 1-12.

The system may further include a client status reader 303 for reading bythe client of all clients' status from all clients sending client statusto the NoSQL database, and a conflict validator 304 for validating noconflict for a read or write transaction by said client to said NoSQLdatabase. The conflict validator 304 confirms that a latest version of avalue is committed before a start time of the transaction. The functionsprovided by the client status reader 303 and conflict validator 304 havebeen further described about with respect to the methods described withreference to FIGS. 1-12.

The write module 305 provides for write transactions, and has beendescribed in greater detail with respect to FIGS. 6, 7 and 8. The readmodule 306 provides for read transactions, and has been described ingreater detail with respect to FIGS. 9 and 10. The commit module 307provides for commit transactions, and has been described in greaterdetail with respect to FIGS. 11 and 12.

It is understood in advance that although this disclosure includes adetailed description on cloud computing, implementation of the teachingsrecited herein are not limited to a cloud computing environment. Rather,embodiments of the present invention are capable of being implemented inconjunction with any other type of computing environment now known orlater developed.

Cloud computing is a model of service delivery for enabling convenient,on-demand network access to a shared pool of configurable computingresources (e.g. networks, network bandwidth, servers, processing,memory, storage, applications, virtual machines, and services) that canbe rapidly provisioned and released with minimal management effort orinteraction with a provider of the service. This cloud model may includeat least five characteristics, at least three service models, and atleast four deployment models.

Characteristics are as follows:

On-demand self-service: a cloud consumer can unilaterally provisioncomputing capabilities, such as server time and network storage, asneeded automatically without requiring human interaction with theservice's provider.

Broad network access: capabilities are available over a network andaccessed through standard mechanisms that promote use by heterogeneousthin or thick client platforms (e.g., mobile phones, laptops, and PDAs).

Resource pooling: the provider's computing resources are pooled to servemultiple consumers using a multi-tenant model, with different physicaland virtual resources dynamically assigned and reassigned according todemand. There is a sense of location independence in that the consumergenerally has no control or knowledge over the exact location of theprovided resources but may be able to specify location at a higher levelof abstraction (e.g., country, state, or datacenter).

Rapid elasticity: capabilities can be rapidly and elasticallyprovisioned, in some cases automatically, to quickly scale out andrapidly released to quickly scale in. To the consumer, the capabilitiesavailable for provisioning often appear to be unlimited and can bepurchased in any quantity at any time.

Measured service: cloud systems automatically control and optimizeresource use by leveraging a metering capability at some level ofabstraction appropriate to the type of service (e.g., storage,processing, bandwidth, and active user accounts). Resource usage can bemonitored, controlled, and reported providing transparency for both theprovider and consumer of the utilized service.

Measured service: cloud systems automatically control and optimizeresource use by leveraging a metering capability at some level ofabstraction appropriate to the type of service (e.g., storage,processing, bandwidth, and active user accounts). Resource usage can bemonitored, controlled, and reported providing transparency for both theprovider and consumer of the utilized service.

Service Models are as follows:

Software as a Service (SaaS): the capability provided to the consumer isto use the provider's applications running on a cloud infrastructure.The applications are accessible from various client devices through athin client interface such as a web browser (e.g., web-based email). Theconsumer does not manage or control the underlying cloud infrastructureincluding network, servers, operating systems, storage, or evenindividual application capabilities, with the possible exception oflimited user-specific application configuration settings.

Platform as a Service (PaaS): the capability provided to the consumer isto deploy onto the cloud infrastructure consumer-created or acquiredapplications created using programming languages and tools supported bythe provider. The consumer does not manage or control the underlyingcloud infrastructure including networks, servers, operating systems, orstorage, but has control over the deployed applications and possiblyapplication hosting environment configurations.

Infrastructure as a Service (IaaS): the capability provided to theconsumer is to provision processing, storage, networks, and otherfundamental computing resources where the consumer is able to deploy andrun arbitrary software, which can include operating systems andapplications. The consumer does not manage or control the underlyingcloud infrastructure but has control over operating systems, storage,deployed applications, and possibly limited control of select networkingcomponents (e.g., host firewalls).

Deployment Models are as follows:

Private cloud: the cloud infrastructure is operated solely for anorganization. It may be managed by the organization or a third party andmay exist on-premises or off-premises.

Community cloud: the cloud infrastructure is shared by severalorganizations and supports a specific community that has shared concerns(e.g., mission, security requirements, policy, and complianceconsiderations). It may be managed by the organizations or a third partyand may exist on-premises or off-premises.

Public cloud: the cloud infrastructure is made available to the generalpublic or a large industry group and is owned by an organization sellingcloud services.

Hybrid cloud: the cloud infrastructure is a composition of two or moreclouds (private, community, or public) that remain unique entities butare bound together by standardized or proprietary technology thatenables data and application portability (e.g., cloud bursting for loadbalancing between clouds).

A cloud computing environment is service oriented with a focus onstatelessness, low coupling, modularity, and semantic interoperability.At the heart of cloud computing is an infrastructure comprising anetwork of interconnected nodes.

Referring now to FIG. 14, a schematic of an example of a cloud computingnode 1310 is shown. Cloud computing node 1310 is only one example of asuitable cloud computing node and is not intended to suggest anylimitation as to the scope of use or functionality of embodiments of theinvention described herein. Regardless, cloud computing node 1310 iscapable of being implemented and/or performing any of the functionalityset forth hereinabove.

In cloud computing node 1310 there is a computer system/server 1312,which is operational with numerous other general purpose or specialpurpose computing system environments or configurations. Examples ofwell-known computing systems, environments, and/or configurations thatmay be suitable for use with computer system/server 1312 include, butare not limited to, personal computer systems, server computer systems,thin clients, thick clients, handheld or laptop devices, multiprocessorsystems, microprocessor-based systems, set top boxes, programmableconsumer electronics, network PCs, minicomputer systems, mainframecomputer systems, and distributed cloud computing environments thatinclude any of the above systems or devices, and the like.

Computer system/server 1312 may be described in the general context ofcomputer system executable instructions, such as program modules, beingexecuted by a computer system. Generally, program modules may includeroutines, programs, objects, components, logic, data structures, and soon that perform particular tasks or implement particular abstract datatypes. Computer system/server 1312 may be practiced in distributed cloudcomputing environments where tasks are performed by remote processingdevices that are linked through a communications network. In adistributed cloud computing environment, program modules may be locatedin both local and remote computer system storage media including memorystorage devices.

As shown in FIG. 14, computer system/server 1312 in cloud computing node1310 is shown in the form of a general-purpose computing device. Thecomponents of computer system/server 1312 may include, but are notlimited to, one or more processors or processing units 1316, a systemmemory 1328, and a bus 1318 that couples various system componentsincluding system memory 1328 to processor 1316.

Bus 1318 represents one or more of any of several types of busstructures, including a memory bus or memory controller, a peripheralbus, an accelerated graphics port, and a processor or local bus usingany of a variety of bus architectures. By way of example, and notlimitation, such architectures include Industry Standard Architecture(ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA)bus, Video Electronics Standards Association (VESA) local bus, andPeripheral Component Interconnect (PCI) bus.

Computer system/server 1312 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 1312, and it includes both volatileand non-volatile media, removable and non-removable media.

System memory 1328 can include computer system readable media in theform of volatile memory, such as random access memory (RAM) 1330 and/orcache memory 1332. Computer system/server 1312 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 1334 can be provided forreading from and writing to a non-removable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 1318 by one or more datamedia interfaces. As will be further depicted and described below,memory 1328 may include at least one program product having a set (e.g.,at least one) of program modules that are configured to carry out thefunctions of embodiments of the invention.

Program/utility 1340, having a set (at least one) of program modules1342, may be stored in memory 1328 by way of example, and notlimitation, as well as an operating system, one or more applicationprograms, other program modules, and program data. Each of the operatingsystem, one or more application programs, other program modules, andprogram data or some combination thereof, may include an implementationof a networking environment. Program modules 1342 generally carry outthe functions and/or methodologies of embodiments of the invention asdescribed herein. For example, the program modules 1342 can include themodules described with reference to FIG. 2.

Computer system/server 1312 may also communicate with one or moreexternal devices 1314 such as a keyboard, a pointing device, a display1324, etc.; one or more devices that enable a user to interact withcomputer system/server 1312; and/or any devices (e.g., network card,modem, etc.) that enable computer system/server 1312 to communicate withone or more other computing devices. Such communication can occur viaInput/Output (I/O) interfaces 1322. Still yet, computer system/server1312 can communicate with one or more networks such as a local areanetwork (LAN), a general wide area network (WAN), and/or a publicnetwork (e.g., the Internet) via network adapter 1320. As depicted,network adapter 1320 communicates with the other components of computersystem/server 1312 via bus 1318. It should be understood that althoughnot shown, other hardware and/or software components could be used inconjunction with computer system/server 1312. Examples, include, but arenot limited to: microcode, device drivers, redundant processing units,external disk drive arrays, RAID systems, tape drives, and data archivalstorage systems, etc.

Referring now to FIG. 15, illustrative cloud computing environment 1450is depicted. As shown, cloud computing environment 1450 comprises one ormore cloud computing nodes 1410 with which local computing devices usedby cloud consumers, such as, for example, personal digital assistant(PDA) or cellular telephone 1454A, desktop computer 1454B, laptopcomputer 1454C, and/or automobile computer system 1454N may communicate.Nodes 1410 may communicate with one another. They may be grouped (notshown) physically or virtually, in one or more networks, such asPrivate, Community, Public, or Hybrid clouds as described hereinabove,or a combination thereof. This allows cloud computing environment 1450to offer infrastructure, platforms and/or software as services for whicha cloud consumer does not need to maintain resources on a localcomputing device. It is understood that the types of computing devices1454A-N shown in FIG. 15 are intended to be illustrative only and thatcomputing nodes 1410 and cloud computing environment 1450 cancommunicate with any type of computerized device over any type ofnetwork and/or network addressable connection (e.g., using a webbrowser).

Referring now to FIG. 17 a set of functional abstraction layers providedby cloud computing environment 1550 (FIG. 17) is shown. It should beunderstood in advance that the components, layers, and functions shownin FIG. 18 are intended to be illustrative only and embodiments of theinvention are not limited thereto. As depicted, the following layers andcorresponding functions are provided:

Hardware and software layer 1560 includes hardware and softwarecomponents. Examples of hardware components include mainframes, in oneexample IBM® zSeries® systems; RISC (Reduced Instruction Set Computer)architecture based servers, in one example IBM pSeries® systems; IBMxSeries® systems; IBM BladeCenter® systems; storage devices; networksand networking components. Examples of software components includenetwork application server software, in one example IBM WebSphere®application server software; and database software, in one example IBMDB2® database software. (IBM, zSeries, pSeries, xSeries, BladeCenter,WebSphere, and DB2 are trademarks of International Business MachinesCorporation registered in many jurisdictions worldwide).

Virtualization layer 1562 provides an abstraction layer from which thefollowing examples of virtual entities may be provided: virtual servers;virtual storage; virtual networks, including virtual private networks;virtual applications and operating systems; and virtual clients.

In one example, management layer 1564 may provide the functionsdescribed below. Resource provisioning provides dynamic procurement ofcomputing resources and other resources that are utilized to performtasks within the cloud computing environment. Metering and Pricingprovide cost tracking as resources are utilized within the cloudcomputing environment, and billing or invoicing for consumption of theseresources. In one example, these resources may comprise applicationsoftware licenses. Security provides identity verification for cloudconsumers and tasks, as well as protection for data and other resources.User portal provides access to the cloud computing environment forconsumers and system administrators. Service level management providescloud computing resource allocation and management such that requiredservice levels are met. Service Level Agreement (SLA) planning andfulfillment provide pre-arrangement for, and procurement of, cloudcomputing resources for which a future requirement is anticipated inaccordance with an SLA.

Workloads layer 1566 provides examples of functionality for which thecloud computing environment may be utilized. Examples of workloads andfunctions which may be provided from this layer include: mapping andnavigation; software development and lifecycle management; virtualclassroom education delivery; data analytics processing; transactionprocessing; and providing for transactions in NoSQL databases.

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Java, Smalltalk, C++ or the like,and conventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

Reference in the specification to “one embodiment” or “an embodiment” ofthe present principles, as well as other variations thereof, means thata particular feature, structure, characteristic, and so forth describedin connection with the embodiment is included in at least one embodimentof the present principles. Thus, the appearances of the phrase “in oneembodiment” or “in an embodiment”, as well any other variations,appearing in various places throughout the specification are notnecessarily all referring to the same embodiment.

It is to be appreciated that the use of any of the following “/”,“and/or”, and “at least one of”, for example, in the cases of “A/B”, “Aand/or B” and “at least one of A and B”, is intended to encompass theselection of the first listed option (A) only, or the selection of thesecond listed option (B) only, or the selection of both options (A andB). As a further example, in the cases of “A, B, and/or C” and “at leastone of A, B, and C”, such phrasing is intended to encompass theselection of the first listed option (A) only, or the selection of thesecond listed option (B) only, or the selection of the third listedoption (C) only, or the selection of the first and the second listedoptions (A and B) only, or the selection of the first and third listedoptions (A and C) only, or the selection of the second and third listedoptions (B and C) only, or the selection of all three options (A and Band C). This may be extended, as readily apparent by one of ordinaryskill in this and related arts, for as many items listed.

Having described preferred embodiments of a system and method (which areintended to be illustrative and not limiting), it is noted thatmodifications and variations can be made by persons skilled in the artin light of the above teachings. It is therefore to be understood thatchanges may be made in the particular embodiments disclosed which arewithin the scope of the invention as outlined by the appended claims.Having thus described aspects of the invention, with the details andparticularity required by the patent laws, what is claimed and desiredprotected by Letters Patent is set forth in the appended claims.

What is claimed is:
 1. A method of a client processing transactions in aNoSQL database comprising: inserting client status from a plurality ofclients to said NoSQL database; sending a call from at least one of saidclients in said plurality of client to a client server in said NoSQLdatabase, wherein the client server sends a time stamp to said client;reading by said at least one client of said clients status from theNoSQL database; validating no conflict for a read or write transactionby said client to said database by said client confirming that a latestversion of a value is committed before a start time of the transaction,wherein the value comprises a client ID, a transaction ID and data; andperforming said read or write transaction by said client if said latestversion of the value has been committed.
 2. The method of claim 1,wherein the client status includes committed client status and abortedclient status.
 3. The method of claim 1, wherein said inserting clientstatus from said plurality of clients to said NoSQL database comprisescaching said client status in NoSQL database.
 4. The method of claim 1,wherein said read or write transaction is a write transaction, and saidvalidating said no conflict includes said client fetching a first latestversion of said value from said NoSQL database, identifying a cache ofthe client status with the values client ID, and checking a transactionID for the first latest version of the value to determine whether it hasbeen committed.
 5. The method of claim 4, wherein if the value is notcommitted, a client status is updated at said cache and the validatingsaid no conflict for a write transaction continues with said clientfetching a second latest version of said value from said NoSQL database,identifying a cache of the updated client status with the values clientID, and checking a transaction ID for the second latest version of thevalue to determine whether it has been committed.
 6. The method of claim5, wherein if the second latest version is not committed, the clientfails the write transaction, aborts the write transaction of the valuestransaction ID (Xid) or orders a constraint to the status.
 7. The methodof claim 6, wherein if the second latest version is not committed, theclient reads a previous version of the value.
 8. The method of claim 6,wherein a single write request is made for each transaction write. 9.The method of claim 1, wherein said read or write transaction is a readtransaction, and said validating said no conflict includes said clientfetching a first latest version of said value from said NoSQL database,and checking if the transaction ID (VXid) for the latest version of saidvalue is committed with the cached client status for the client ID(Cid), wherein if the transaction ID (VXid) is committed, and a committime stamp from the client status is less than a start time stamp, datafrom the latest version of said value is read by the client.
 10. Themethod of claim 1, wherein said read or write transaction is a readtransaction, and said validating said no conflict includes said clientfetching a first latest version of said value from said NoSQL database,and checking if the transaction ID (VXid) for the latest version of saidvalue is committed with the cached client status for the client ID(Cid), wherein if the transaction ID (VXid) is not committed, the clientwaits for the transaction of the transaction ID to complete, the clientaborts the transaction or the client adds an order constraint to theclient status in the NoSQL database.
 11. The method of claim 1 furthercomprising a commit transaction.
 12. A client system for controllingtransactions with a NoSQL database comprising: a client status updatetransceiver for sending client status from a client to a NoSQL database;a time stamp transceiver for sending a call from said client to a clientserver in said NoSQL database, and receiving a time stamp from saidclient server; a client status reader for reading by the client of allclients status from all clients sending client status to the NoSQLdatabase; a conflict validator for validating no conflict for a read orwrite transaction by said client to said NoSQL database, said conflictvalidator confirming that a latest version of a value is committedbefore a start time of the transaction, wherein the value comprises aclient ID, a transaction ID and data; and a read or write module forperforming said read or write transaction by said client if said latestversion of the value has been committed.
 13. The system of claim 12,wherein said read or write transaction is a write transaction, and saidvalidating said no conflict includes said client fetching a first latestversion of said value from said NoSQL database, identifying a cache ofthe client status with the values client ID, and checking a transactionID for the first latest version of the value to determine whether it hasbeen committed.
 14. The system of claim 13, wherein if the value is notcommitted, a client status is updated at said cache and the validatingsaid no conflict for a write transaction continues with said clientfetching a second latest version of said value from said NoSQL database,identifying a cache of the updated client status with the values clientID, and checking a transaction ID for the second latest version of thevalue to determine whether it has been committed.
 15. The method ofclaim 14, wherein if the second latest version is not committed, theclient fails the write transaction, aborts the write transaction of thevalues transaction ID (Xid) or orders a constraint to the status. 16.The system of claim 15, wherein if the second latest version is notcommitted, the client reads a previous version of the value.
 17. Thesystem of claim 12, wherein said read or write transaction is a readtransaction, and said validating said no conflict includes said clientfetching a first latest version of said value from said NoSQL database,and checking if the transaction ID (VXid) for the latest version of saidvalue is committed with the cached client status for the client ID(Cid), wherein if the transaction ID (VXid) is committed, and a committime stamp from the client status is less than a start time stamp, datafrom the latest version of said value is read by the client.
 18. Thesystem of claim 17, wherein said read or write transaction is a readtransaction, and said validating said no conflict includes said clientfetching a first latest version of said value from said NoSQL database,and checking if the transaction ID (VXid) for the latest version of saidvalue is committed with the cached client status for the client ID(Cid), wherein if the transaction ID (VXid) is not committed, the clientwaits for the transaction of the transaction ID to complete, the clientaborts the transaction or the client adds an order constraint to theclient status in the NoSQL database.
 19. The system of claim 12 furthercomprising a commit transaction module.
 20. A non-transitory computerreadable storage medium comprising a computer readable program for aclient processing transactions in a NoSQL database, wherein the computerreadable program when executed on a computer causes the computer toperform the steps of: inserting client status from a plurality ofclients to said NoSQL database; sending a call from at least one of saidclients in said plurality of client to a client server in said NoSQLdatabase, wherein the client server sends a time stamp to said client;reading by said at least one client of said clients status from theNoSQL database; validating no conflict for a read or write transactionby said client to said database by said client confirming that a latestversion of a value is committed before a start time of the transaction,wherein the value comprises a client ID, a transaction ID and data; andperforming said read or write transaction by said client if said latestversion of the value has been committed.